package com.googlecode.c4e.ui.views.internal;

import org.eclipse.core.runtime.jobs.ISchedulingRule;

import com.googlecode.c4e.api.model.Server;

public class ServerAdapterSchedulingRule implements ISchedulingRule {

	private Server server;

	ServerAdapterSchedulingRule(Server server) {
		this.server = server;
	}

	public boolean contains(ISchedulingRule rule) {
		if (rule instanceof ServerAdapterSchedulingRule) {
			return ((ServerAdapterSchedulingRule) rule).server.equals(server);
		}
		return false;
	}

	public boolean isConflicting(ISchedulingRule rule) {
		return contains(rule);
	}

}
